import { createBrowserRouter } from "react-router-dom";
import App from "../App";

const router=createBrowserRouter([
    {
        path:'/',
        element:<App/>,
        children:[
            {
                path:'home',
                lazy:async()=>{
                    const {default:Home}=await import('../view/Home/index')
                    return{
                        element:<Home/>
                    }
                }
            },
            {
                path:'order',
                lazy:async()=>{
                    const {default:Order}=await import('../view/Order/index')
                    return{
                        element:<Order/>
                    }
                }
            },
        ]
    }
])
export default router